﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Services;

namespace DTcms.Web.WebServices
{
    public class EventList
    {
        public string ErrorMsg { get; set; }
        public List<Event> Events { get; set; }
    }
    public class Event
    {
        public DateTime lastUpdateDate { get; set; }
        public int eventID { get; set; }
        public string title { get; set; }
        public DateTime eventDate { get; set; }
        public int numberOfLike { get; set; }
        public int numberOfMsg { get; set; }
        public thumbnails thumbnails { get; set; }
    }
    public class thumbnails
    {
        public string Key1 { get; set; }
        public string Key2 { get; set; }
        public string Key3 { get; set; }
    }
    /// <summary>
    /// EventServices 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]

    public class EventServices : System.Web.Services.WebService
    {

        [WebMethod]
        public EventList GetEventList(int MemberID)
        {

            return new EventList()
            {
                ErrorMsg = "no error",
                Events = new List<Event>()
                {
                    new Event(){ lastUpdateDate=DateTime.Now, eventID=1,title="hello",eventDate=DateTime.Now,numberOfLike=10,numberOfMsg=20,thumbnails=new thumbnails(){ Key1="key1", Key2="key2", Key3="key3"}},
                    new Event(){ lastUpdateDate=DateTime.Now, eventID=1,title="hello",eventDate=DateTime.Now,numberOfLike=10,numberOfMsg=20},
                    new Event(){ lastUpdateDate=DateTime.Now, eventID=1,title="hello",eventDate=DateTime.Now,numberOfLike=10,numberOfMsg=20}
                }
            };
        }
    }
}
